Platform Explorer / Nuxeo Platform LTS 2015 7.10

Contribution org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib--providers

This contribution is part of XML component org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib inside nuxeo-elasticsearch-audit-7.10.jar /OSGI-INF/es-audit-pageprovider-contrib.xml

Extension Point

Extension point providers of component PageProviderService.

Contributed Items

  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
          <whereClause docType="BasicAuditSearch">
            <fixedPart>
                {
    		        "bool" : {
    		          "must" : {
    		            "match" : {
    		              "docUUID" : {
    		                "query" : "?",
    		                "type" : "boolean"
    		              }
    		            }
    		          }
    		        }
    			  }          
            </fixedPart>
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>
          </whereClause>
          <sort ascending="true" column="id"/>
          <pageSize>5</pageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
          <whereClause docType="BasicAuditSearch">
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>                
          </whereClause>
          <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
            <property name="coreSession"/>
            <property name="generateUIComments">false</property>
            <whereClause docType="BasicAuditSearch">
              <predicate operator="BETWEEN" parameter="eventDate">
                <field name="startDate" schema="basicauditsearch"/>
                <field name="endDate" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="category">
                <field name="eventCategory" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="IN" parameter="eventId">
                <field name="eventIds" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="principalName">
                <field name="principalName" schema="basicauditsearch"/>
              </predicate>
            </whereClause>
            <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
          </genericPageProvider>

XML Source

<extension point="providers" target="org.nuxeo.ecm.platform.query.api.PageProviderService">

    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
      <whereClause docType="BasicAuditSearch">
        <fixedPart>
            {
		        "bool" : {
		          "must" : {
		            "match" : {
		              "docUUID" : {
		                "query" : "?",
		                "type" : "boolean"
		              }
		            }
		          }
		        }
			  }          
        </fixedPart>
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>
      </whereClause>
      <sort ascending="true" column="id"/>
      <pageSize>5</pageSize>
    </genericPageProvider>


    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
      <whereClause docType="BasicAuditSearch">
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>                
      </whereClause>
      <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
    </genericPageProvider>

      <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
        <property name="coreSession"/>
        <property name="generateUIComments">false</property>
        <whereClause docType="BasicAuditSearch">
          <predicate operator="BETWEEN" parameter="eventDate">
            <field name="startDate" schema="basicauditsearch"/>
            <field name="endDate" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="category">
            <field name="eventCategory" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="IN" parameter="eventId">
            <field name="eventIds" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="principalName">
            <field name="principalName" schema="basicauditsearch"/>
          </predicate>
        </whereClause>
        <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
      </genericPageProvider>

  </extension>